
const express = require('express');

const router = express.Router();
const { setToken, getToken } = require('@/utils/index.js');

router.get('/test', function (req, res, next) {
  res.send({
    status: 200,
    message: '登录成功！',
  })
});

router.get('/login', function (req, res, next) {
  res.send({
    status: 200,
    message: '登录成功！',
    token: setToken('zhangsan', '00001')
  })
});

router.get('/yanzheng:sign', function (req, res, next) {
  const sign = req.params.sign
  res.send({
    status: 200,
    message: '登录成功！',
    token: getToken(sign)
  })


});




module.exports = router;